﻿

/******************************/
/* jQuery Adapters            */
/******************************/
jQuery.validator.unobtrusive.adapters.add
    ("customrequired", {}, function (options) {
        options.rules['customrequiredrule'] = true;
        options.messages['customrequiredrule'] = options.message;
    }
);

/*****************************/
/* The 'Required Field' Rule */
/*****************************/
jQuery.validator.addMethod("customrequiredrule", function (value, element, params) {
    if (value == '')
        return false;
    else
        return true;
}); 


